Skip to content

Home Location page #4926

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 15, 2025
Merged

Conversation

AntonKhorev
Copy link
Collaborator

This adds a home location page with its own URL similar to what's suggested in #670 (comment), without sidebar and extra controls. Instead of /:username/home I use the path /account/home because it's easier to implement, no need to check :username.

A link to this page is available on every other page with the user dropdown menu. This fixes #1810.

image

It's possible to leave this page for another map page. In this case the javascript controller removes the home location marker. This fixes #669 and #670.

@AntonKhorev AntonKhorev added the javascript Pull requests that update Javascript code label Jul 3, 2024
@nertc
Copy link
Contributor

nertc commented Sep 6, 2024

Described functionality works perfectly. Redirection is flawless in all situations (browser back/forward button navigation, page refresh, browser link navigation, app menu navigation). Home icon appears in /account/home and disappears as soon as a user is redirected to another page. The only question I have, wouldn't it be better if we used I18n translate function I18n.t instead of hard coded text while using click_on and assert_text in tests. In that case, even if, in the future, we decide to change texts, it won't break tests.

@AntonKhorev
Copy link
Collaborator Author

The only question I have, wouldn't it be better if we used I18n translate function I18n.t instead of hard coded text while using click_on and assert_text in tests. In that case, even if, in the future, we decide to change texts, it won't break tests.

Changing names of i18n strings will break tests then.

@AntonKhorev AntonKhorev force-pushed the home-location-page branch 2 times, most recently from 543a8ea to db48062 Compare January 15, 2025 23:41
@AntonKhorev
Copy link
Collaborator Author

Updated for let/const.

@tomhughes
Copy link
Member

Looks good to me, thanks.

@tomhughes tomhughes merged commit 29d322c into openstreetmap:master Feb 15, 2025
22 checks passed
@AntonKhorev AntonKhorev deleted the home-location-page branch February 15, 2025 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Go to Your Home Location gone sometimes Clicking on logo does not remove home location marker
3 participants